﻿/*
 * Created by SharpDevelop.
 * User: Adam
 * Date: 12/19/2008
 * Time: 10:38 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.IO;
using Yaml.Grammar;

namespace YamlTest
{
	class Program
	{
		public static void Main(string[] args)
		{
			Console.WriteLine("Hello World!");
			
			// TODO: Implement Functionality Here
			
			YamlParser parser = new YamlParser();
            TextInput input = new TextInput(File.ReadAllText("test1.yaml"));
            bool success;
            YamlStream yamlStream = parser.ParseYamlStream(input, out success);
            if (success)
            {
                foreach (YamlDocument doc in yamlStream.Documents)
                {
                   // access DataItem by doc.Root
                }
            }
            else
            {
                //MessageBox.Show(parser.GetEorrorMessages());
            }
			
			//Console.Write("Press any key to continue . . . ");
			//Console.ReadKey(true);
		}
	}
}